#ifndef __DBCOM_H__
#define __DBCOM_H__

#define SQL_THREAD_SAFE_PREPARE \
struct sqlca sqlca

#define SQL_CODE_PROCESS(table,action) \
if(sqlca.sqlcode!=DB_OK && sqlca.sqlcode!=DB_NOTFOUND) \
{ \
    printf("%s: %s --- ISAM Code: %d, Info: %s", \
        table, action, \
        sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc); \
} \
return(sqlca.sqlcode)

typedef struct
{
    sql_context context;
} thrd_conn_t;
extern thrd_conn_t a_thrd_conn[10];

#endif
